#include "Tests.h"
#include "../BubbleSort/BubbleSort.h"
#include "../SelectionSort/SelectionSort.h"
#include "../InsertionSort/InsertionSort.h"
#include "../MergeSort/MergeSort.h"
#include "../QuickSort/QuickSort.h"
using namespace std;
void Tests::testAlgorithms(long *data)
{
    //this -> a(data);
    this -> b(data);
    this -> c(data);
    this -> d(data);
    this -> e(data);
}
void Tests::a(long *data)
{
    BubbleSort A = BubbleSort(data);
    cout << "BubbleSort does it in " << A.getExecutionTime() << " seconds.";
    if (A.Check())
        cout << "\tok.";
    else
        cout << "\tnot ok.";
    cout << "\n";
}
void Tests::b(long *data)
{
    SelectionSort B = SelectionSort(data);
    cout << "SelectionSort does it in " << B.getExecutionTime() << " seconds.";
    if (B.Check())
        cout << "\tok.";
    else
        cout << "\tnot ok.";
    cout << "\n";
}
void Tests::c(long *data)
{
    InsertionSort C = InsertionSort(data);
    cout << "InsertionSort does it in " << C.getExecutionTime() << " seconds.";
    if (C.Check())
        cout << "\tok.";
    else
        cout << "\tnot ok.";
    cout << "\n";
}
void Tests::d(long *data)
{
    MergeSort D = MergeSort(data);
    cout << "MergeSort does it in " << D.getExecutionTime() << " seconds.";
    if (D.Check())
        cout << "\tok.";
    else
        cout << "\tnot ok.";
    cout << "\n";
}
void Tests::e(long *data)
{
    QuickSort E = QuickSort(data);
    cout << "QuickSort does it in " << E.getExecutionTime() << " seconds.";
    if (E.Check())
        cout << "\tok.";
    else
        cout << "\tnot ok.";
    cout << "\n";
}

